import '@css/app.css'
import '@css/login.css'
import '@css/style.css'
import '@css/body.css'
import apis from '@utils/apis'
import router from '@utils/router'
import {
	$U_UserInfo,
} from '@utils/storage'

$(function() {
	$('#loginBtn').click(function(e) {
		let username = document.getElementById('username').value
		let password = document.getElementById('password').value
		apis.loginApi({
			username,
			password,
		}).then(res => {
			if (res.code == '000') {
				$U_UserInfo(res.result)
				return router.loc('index')
			}
			return false
		})
		return false
	})

	// $('#loginMethod').click(function(e) {

	// })
})